package com.ysxsoft.wdg.ui.activity.ht;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.NestedScrollView;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
import com.youth.banner.Banner;
import com.ysxsoft.wdg.R;
import com.ysxsoft.wdg.adapter.ht.HtYlAdapter;
import com.ysxsoft.wdg.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class HtDetailActivity extends BaseActivity {


    private List<String> list;

    public static void start(Context context, String detail_id){
        Intent intent = new Intent(context,HtDetailActivity.class);
        intent.putExtra("detail_id",detail_id);
        context.startActivity(intent);
    }
    @BindView(R.id.topView)
    View topView;
    @BindView(R.id.banner)
    Banner banner;
    @BindView(R.id.video_player)
    StandardGSYVideoPlayer videoPlayer;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_tx)
    ImageView ivTx;
    @BindView(R.id.tv_nick)
    TextView tvNick;
    @BindView(R.id.webView)
    WebView webView;
    @BindView(R.id.recyclerview)
    RecyclerView recyclerview;
    @BindView(R.id.tv_more)
    TextView tvMore;
    @BindView(R.id.scrollView)
    NestedScrollView scrollView;
    @BindView(R.id.et_input)
    EditText etInput;
    @BindView(R.id.btn_zan)
    TextView tvZanNum;
    @BindView(R.id.ll_ly)
    LinearLayout llZan;

    private HtYlAdapter adapter;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_ht_detail;
    }

    @Override
    protected void initData() {
        initStatusBar(topView,false);


        recyclerview.setLayoutManager(new LinearLayoutManager(this));
        adapter = new HtYlAdapter(R.layout.item_ht_ly);
        recyclerview.setAdapter(adapter);

        list = new ArrayList<>();
        list.add("");
        list.add("");

        adapter.setNewData(list);
    }

    @Override
    protected void setListener() {

    }

    @OnClick({R.id.iv_finish, R.id.tv_more, R.id.btn_zan})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_finish:
                finish();
                break;
            case R.id.tv_more:
                tvMore.setVisibility(View.GONE);
                list.add("");
                list.add("");
                list.add("");
                list.add("");
                adapter.setNewData(list);
                break;
            case R.id.btn_zan:
                break;
        }
    }
}
